<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/10/31
 * Time: 17:36
 */

namespace Modules\Web\Http\Controllers;

use HiCommon\Service\ShopJoinService;
use Illuminate\Support\Facades\Request;

class ShopJoinController extends BaseController
{

    /*门店类型副标题*/
    public function shop_join_subheading(){
        try {
            $res = ShopJoinService::api_shop_join_subheading();
            return $res;
        }
        catch (\Exception $exception) {
            return hello_error('失败',[],$exception->getMessage());
        }
    }

    /**
     * 检测站类型列表
     *
     * @return array|void
     * @author wumengmeng <wu_mengmeng@foxmail.com>
     */
    public function checkpoint_type_list(){
        try {
            $res = ShopJoinService::api_checkpoint_type_list();
            return $res;
        }
        catch (\Exception $exception) {
            return hello_error('失败',[],$exception->getMessage());
        }
    }


    /**
     * 门店加盟申请
     *
     * @return array|void
     * @author wumengmeng <wu_mengmeng@foxmail.com>
     */
    public function shop_join_apply(){
        try {
            $arr_input = Request::input();
            shiwu_start();
            $res = ShopJoinService::api_shop_join_apply($arr_input);
            shiwu_end($res);
            return $res;
        }
        catch (\Exception $exception) {
            return hello_error('失败',[],$exception->getMessage());
        }
    }

    /**
     * 门店加盟申请查询
     *
     * @return array|void
     * @author wumengmeng <wu_mengmeng@foxmail.com>
     */
    public function shop_apply_search(){
        try {
            $s_phone = Request::input('phone','');
            $res = ShopJoinService::api_shop_apply_search($s_phone);
            return $res;
        }
        catch (\Exception $exception) {
            return hello_error('失败',[],$exception->getMessage());
        }
    }
}